package com.luoyuanxiangvip.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.luoyuanxiangvip.core.entity.support.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 文章
 * </p>
 *
 * @author luoyuanxiang <p>luoyuanxiangvip.com</p>
 * @since 2019-05-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "BizArticle对象", description = "文章")
public class BizArticle extends BaseEntity {

    private static final long serialVersionUID = -8472149971633231806L;
    @ApiModelProperty(value = "文章标题")
    private String title;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "文章封面图片")
    private String thumb;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "状态")
    private Boolean status;

    @ApiModelProperty(value = "分类id")
    private Integer categoryId;

    @ApiModelProperty(value = "【0 原创】【1 转载】【2 混合】")
    private Integer origin;

    @ApiModelProperty(value = "文章简介，最多200字")
    private String description;

    @ApiModelProperty(value = "文章关键字，优化搜索")
    private String keywords;

    @ApiModelProperty(value = "是否开启评论")
    private Boolean comment;

    @ApiModelProperty(value = "是否置顶")
    private Boolean top;

    /**
     * 标签
     */
    @TableField(exist = false)
    private List<Long> tagIds;

    /**
     * 相关文章
     */
    @TableField(exist = false)
    private List<BizArticle> related;

    /**
     * 文章标签
     */
    @TableField(exist = false)
    private List<BizTag> tag;

    /**
     * 文章分类
     */
    @TableField(exist = false)
    private BizCategory category;

    /**
     * 围观人数
     */
    @TableField(exist = false)
    private Integer lookCount = 0;

    /**
     * 评论数
     */
    @TableField(exist = false)
    private Integer commentCount = 0;

    /**
     * 点赞
     */
    @TableField(exist = false)
    private Integer loveCount = 0;


}
